package com.wxm.pattern.simplepactory;

import com.wxm.pattern.Cat;
import com.wxm.pattern.IAnimal;
import com.wxm.pattern.Pig;

public class AnimalFactoryTest {
    public static void main(String[] args) throws Exception {
        AnimalFactory factory = new AnimalFactory();
        IAnimal animal = factory.getAnimal(Pig.class);
        animal.eat();

    }
}
